<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>无标题</title>
<link rel="stylesheet" href="ext/resources/css/ext-all.css"/>
<script type="text/javascript"  src="ext/ext-all.js"></script>
<script>
Ext.onReady(function(){
	Ext.define("person",{
		extend:"Ext.data.Model",
		fields:[
			{name:"name",type:"auto"},
			{name:"age",type:"int"},
			{name:"sex",type:"auto"}
		],
		proxy:{
			type:'ajax',
			url:"person.jsp"
		}
	});
	
	var p = Ext.ModelManager.getModel("person");
		p.load(1,{
			scope: this,
			failure: function(record, operation) {
				alert("failure");
			},
			success: function(record, operation) {
				alert(record.data.sex);
				
			},
			callback: function(record, operation) {
				
			}
	});
});
</script>
</head>

<body>
</body>
</html>
